﻿using System.Collections.Generic;
using Metro.Kashikoi.Service.Common.Entity;
using Metro.Kashikoi.Service.Item.Business;
using Metro.Kashikoi.ServiceContract.Item;

namespace Metro.Kashikoi.Service.Test.Item
{
    class MockCategoryFacade : ICategoryFacade
    {
        public IUnitOfWork Context { get; private set; }
        public int EntityId { get; private set; }
        public object Entity { get; private set; }
        
        public void CreateCategory(IUnitOfWork context, ColorCategory category)
        {
            this.Context = context;
            this.Entity = category;
        }

        public void UpdateCategory(IUnitOfWork context, ColorCategory category)
        {
            this.Context = context;
            this.Entity = category;
        }

        public void DeleteCategory(IUnitOfWork context, int categoryId)
        {
            this.Context = context;
            this.EntityId = categoryId;
        }

        public ColorCategory GetCategory(IUnitOfWork context, int id)
        {
            this.Context = context;
            this.EntityId = id;
            return new ColorCategory();
        }

        public IList<ColorCategory> GetAllCategories(IUnitOfWork context)
        {
            this.Context = context;
            return new List<ColorCategory>();
        }
    }
}
